import { HttpManager } from "../../core/managers/HttpManager";


const { ccclass, property } = cc._decorator;
@ccclass
export default class AnswerItem extends cc.Component {

    @property({ type: cc.Label, tooltip: '文字' })
    lab_answer: cc.Label = null;

    onLoad() {
        this.initEvent();
    }
    initEvent() {
        this.lab_answer.node.on(cc.Node.EventType.TOUCH_START, this.onGameStart, this);
    }
    async onGameStart() {
        let info = await HttpManager.getWordInfo(this.lab_answer.string)
        console.log(info);

    }
    setData(word: string) {
        this.lab_answer.string = word;
    }

}